package cn.hncev.xiaohui;

import java.util.HashSet;
/*
 * 
 *HashSet集合的用法
 * 
 */
public class ExampleTest34 {
	public static void main(String[] args) {
		HashSet hsHashSet = new HashSet();
		Student s1=new Student("1","肖小");
		Student s2=new Student("2","小小");
		Student s3=new Student("2","哈哈");
		hsHashSet.add(s1);
		hsHashSet.add(s2);
		hsHashSet.add(s3);
		System.out.println(hsHashSet);
}
}
class Student{
	String id;
	String name;
	public Student (String id,String name) {
		this.id=id;
		this.name=name;
	}
	public String toString() {
		return id + ":" + name;
	}
}
